import request from '@/utils/request';

export function getOrganizationunitForTree(data:any) {
    return request({
        url: `/api/identity/organizationUnit/orgForTree`,
        method: 'get',
        params: data
    })
}

export function addOrganization(param:any){
    return request({
        url: '/api/identity/organizationUnit',
        method: 'post',
        data: param
    })
}


export function updateOrganization(data:any) {
    return request({
        url: '/api/identity/organizationUnit',
        method: 'put',
        data: data
    })
}


export function moveOrganization(data:any) {
    return request({
        url: `/api/identity/organizationUnit/move`,
        method: 'put',
        data: data
    })
}

export function getOrganization(orgId:any) {
    return request({
        url: `/api/identity/organizationUnit?orgId=${orgId}`,
        method: 'get',
    })
}

export function deleteOrganization(id:String) {
    return request({
        url: `/api/identity/organizationUnit/${id}`,
        method: 'delete',
    })
}
